/*
 * Jabberd2-json-libs-java  
 * Copyright (C) 2010 Antti Leppä / Foyt
 * http://www.foyt.fi
 * 
 * License: 
 * 
 * Licensed under GNU General Public License Version 3 (GPL) 
 * http://www.gnu.org/licenses/gpl.html
 */

package fi.foyt.jabberd2json;

import java.util.ArrayList;
import java.util.List;

/**
 * Defines object set
 */
public class ObjectSet {
  
  /**
   * Adds new field to object set
   * 
   * @param field field to be added. Ignores null values
   */
  public void addField(ObjectSetField field) {
    if (field != null)
      fields.add(field);
  }
  
  /**
   * Returns added fields
   * 
   * @return added fields
   */
  public List<ObjectSetField> getFields() {
    return fields;
  }
  
  private List<ObjectSetField> fields = new ArrayList<ObjectSetField>();
}
